package cn.nami.web.frontpage.entity;

import javax.jdo.annotations.IdGeneratorStrategy;
import javax.jdo.annotations.IdentityType;
import javax.jdo.annotations.PersistenceCapable;
import javax.jdo.annotations.Persistent;
import javax.jdo.annotations.PrimaryKey;

/**
 * A User is who can login web site
 * @author nami
 *
 */
@PersistenceCapable(identityType = IdentityType.APPLICATION)
public class User
{
	@PrimaryKey
    @Persistent(valueStrategy = IdGeneratorStrategy.IDENTITY)
	private Integer id;

	// a user has a global only name
	@Persistent
	private String username;
	
	@Persistent
	private String prettyName;

	@Persistent
	private String password;

	@Persistent
	private String email;

	@Persistent
	private String registeDate;
	
	public User(){};
	
	public User(String username, String password)
	{
		this.username = username;
		this.password = password;
	}

	public Integer getId()
	{
		return id;
	}

	public void setId(Integer id)
	{
		this.id = id;
	}

	public String getUsername()
	{
		return username;
	}

	public void setUsername(String username)
	{
		this.username = username;
	}

	public String getPassword()
	{
		return password;
	}

	public void setPassword(String password)
	{
		this.password = password;
	}

	public String getEmail()
	{
		return email;
	}

	public void setEmail(String email)
	{
		this.email = email;
	}

	public String getRegisteDate()
	{
		return registeDate;
	}

	public void setRegisteDate(String registeDate)
	{
		this.registeDate = registeDate;
	}

	public String getPrettyName()
	{
		return prettyName;
	}

	public void setPrettyName(String prettyName)
	{
		this.prettyName = prettyName;
	}
}